﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyRabbit.Application.ErrorCode
{
    public class APIResult<T> where T : class
    {
        /// <summary>
        /// 编码
        /// </summary>
        public Codes Code { get; set; }
        /// <summary>
        /// 消息
        /// </summary>
        public string Message { get; set; }
        /// <summary>
        /// 数据
        /// </summary>
        public T Data { get; set; }
    }

    /// <summary>
    /// 状态码
    /// </summary>
    public enum Codes
    {
        查询成功 = 100,
        查询失败 = 101,
        登录成功 = 200,
        登录失败 = 201,
        添加成功 = 300,
        添加失败 = 301,
        删除成功=400,
        删除失败=401,
        修改成功=500,
        修改失败=501
    }
}
